Optimal. Leaf size=571 \[ -\frac {\left (b \left (b^2 d^2-c \left (c+3 a d^2\right )\right )-c \left (2 c^2-b^2 d^2+2 a c d^2\right ) x\right ) \sqrt {1-d^2 x^2}}{\left (b^2-4 a c\right ) \left (b^2 d^2-\left (c+a d^2\right )^2\right ) \left (a+b x+c x^2\right )}-\frac {c \left (4 c^3+12 a c^2 d^2-a b \left (b+\sqrt {b^2-4 a c}\right ) d^4-c d^2 \left (5 b^2-b \sqrt {b^2-4 a c}-8 a^2 d^2\right )\right ) \tanh ^{-1}\left (\frac {2 c+\left (b-\sqrt {b^2-4 a c}\right ) d^2 x}{\sqrt {2} \sqrt {2 c^2+2 a c d^2-b \left (b-\sqrt {b^2-4 a c}\right ) d^2} \sqrt {1-d^2 x^2}}\right )}{\sqrt {2} \left (b^2-4 a c\right )^{3/2} \sqrt {2 c^2+2 a c d^2-b \left (b-\sqrt {b^2-4 a c}\right ) d^2} \left (b^2 d^2-\left (c+a d^2\right )^2\right )}+\frac {c \left (4 c^3+12 a c^2 d^2-2 a b^2 d^4-b \left (b+\sqrt {b^2-4 a c}\right ) d^2 \left (c-a d^2\right )-4 c d^2 \left (b^2-2 a^2 d^2\right )\right ) \tanh ^{-1}\left (\frac {2 c+\left (b+\sqrt {b^2-4 a c}\right ) d^2 x}{\sqrt {2} \sqrt {2 c^2+2 a c d^2-b \left (b+\sqrt {b^2-4 a c}\right ) d^2} \sqrt {1-d^2 x^2}}\right )}{\sqrt {2} \left (b^2-4 a c\right )^{3/2} \sqrt {2 c^2+2 a c d^2-b \left (b+\sqrt {b^2-4 a c}\right ) d^2} \left (b^2 d^2-\left (c+a d^2\right )^2\right )} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 4.04, antiderivative size = 571, normalized size of antiderivative = 1.00, number of steps
used = 7, number of rules used = 5, integrand size = 32, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.156, Rules used = {913, 989, 1048,
739, 212} \begin {gather*} -\frac {c \left (-c d^2 \left (-8 a^2 d^2-b \sqrt {b^2-4 a c}+5 b^2\right )-a b d^4 \left (\sqrt {b^2-4 a c}+b\right )+12 a c^2 d^2+4 c^3\right ) \tanh ^{-1}\left (\frac {d^2 x \left (b-\sqrt {b^2-4 a c}\right )+2 c}{\sqrt {2} \sqrt {1-d^2 x^2} \sqrt {-b d^2 \left (b-\sqrt {b^2-4 a c}\right )+2 a c d^2+2 c^2}}\right )}{\sqrt {2} \left (b^2-4 a c\right )^{3/2} \sqrt {-b d^2 \left (b-\sqrt {b^2-4 a c}\right )+2 a c d^2+2 c^2} \left (b^2 d^2-\left (a d^2+c\right )^2\right )}+\frac {c \left (-4 c d^2 \left (b^2-2 a^2 d^2\right )-b d^2 \left (\sqrt {b^2-4 a c}+b\right ) \left (c-a d^2\right )-2 a b^2 d^4+12 a c^2 d^2+4 c^3\right ) \tanh ^{-1}\left (\frac {d^2 x \left (\sqrt {b^2-4 a c}+b\right )+2 c}{\sqrt {2} \sqrt {1-d^2 x^2} \sqrt {-b d^2 \left (\sqrt {b^2-4 a c}+b\right )+2 a c d^2+2 c^2}}\right )}{\sqrt {2} \left (b^2-4 a c\right )^{3/2} \sqrt {-b d^2 \left (\sqrt {b^2-4 a c}+b\right )+2 a c d^2+2 c^2} \left (b^2 d^2-\left (a d^2+c\right )^2\right )}-\frac {\sqrt {1-d^2 x^2} \left (b \left (b^2 d^2-c \left (3 a d^2+c\right )\right )-c x \left (2 a c d^2-b^2 d^2+2 c^2\right )\right )}{\left (b^2-4 a c\right ) \left (b^2 d^2-\left (a d^2+c\right )^2\right ) \left (a+b x+c x^2\right )} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 212
Rule 739
Rule 913
Rule 989
Rule 1048
Rubi steps
\begin {align*} \int \frac {1}{\sqrt {1-d x} \sqrt {1+d x} \left (a+b x+c x^2\right )^2} \, dx &=\int \frac {1}{\left (a+b x+c x^2\right )^2 \sqrt {1-d^2 x^2}} \, dx\\ &=-\frac {\left (b \left (b^2 d^2-c \left (c+3 a d^2\right )\right )-c \left (2 c^2-b^2 d^2+2 a c d^2\right ) x\right ) \sqrt {1-d^2 x^2}}{\left (b^2-4 a c\right ) \left (b^2 d^2-\left (c+a d^2\right )^2\right ) \left (a+b x+c x^2\right )}-\frac {\int \frac {-2 c^3-6 a c^2 d^2+a b^2 d^4+2 c d^2 \left (b^2-2 a^2 d^2\right )-b c d^2 \left (c-a d^2\right ) x}{\left (a+b x+c x^2\right ) \sqrt {1-d^2 x^2}} \, dx}{\left (b^2-4 a c\right ) \left (b^2 d^2-\left (c+a d^2\right )^2\right )}\\ &=-\frac {\left (b \left (b^2 d^2-c \left (c+3 a d^2\right )\right )-c \left (2 c^2-b^2 d^2+2 a c d^2\right ) x\right ) \sqrt {1-d^2 x^2}}{\left (b^2-4 a c\right ) \left (b^2 d^2-\left (c+a d^2\right )^2\right ) \left (a+b x+c x^2\right )}+\frac {\left (c \left (4 c^3+12 a c^2 d^2-a b \left (b+\sqrt {b^2-4 a c}\right ) d^4-c d^2 \left (5 b^2-b \sqrt {b^2-4 a c}-8 a^2 d^2\right )\right )\right ) \int \frac {1}{\left (b-\sqrt {b^2-4 a c}+2 c x\right ) \sqrt {1-d^2 x^2}} \, dx}{\left (b^2-4 a c\right )^{3/2} \left (b^2 d^2-\left (c+a d^2\right )^2\right )}+\frac {\left (b c \left (b+\sqrt {b^2-4 a c}\right ) d^2 \left (c-a d^2\right )+2 c \left (-2 c^3-6 a c^2 d^2+a b^2 d^4+2 c d^2 \left (b^2-2 a^2 d^2\right )\right )\right ) \int \frac {1}{\left (b+\sqrt {b^2-4 a c}+2 c x\right ) \sqrt {1-d^2 x^2}} \, dx}{\left (b^2-4 a c\right )^{3/2} \left (b^2 d^2-\left (c+a d^2\right )^2\right )}\\ &=-\frac {\left (b \left (b^2 d^2-c \left (c+3 a d^2\right )\right )-c \left (2 c^2-b^2 d^2+2 a c d^2\right ) x\right ) \sqrt {1-d^2 x^2}}{\left (b^2-4 a c\right ) \left (b^2 d^2-\left (c+a d^2\right )^2\right ) \left (a+b x+c x^2\right )}-\frac {\left (c \left (4 c^3+12 a c^2 d^2-a b \left (b+\sqrt {b^2-4 a c}\right ) d^4-c d^2 \left (5 b^2-b \sqrt {b^2-4 a c}-8 a^2 d^2\right )\right )\right ) \text {Subst}\left (\int \frac {1}{4 c^2-\left (b-\sqrt {b^2-4 a c}\right )^2 d^2-x^2} \, dx,x,\frac {2 c+\left (b-\sqrt {b^2-4 a c}\right ) d^2 x}{\sqrt {1-d^2 x^2}}\right )}{\left (b^2-4 a c\right )^{3/2} \left (b^2 d^2-\left (c+a d^2\right )^2\right )}-\frac {\left (b c \left (b+\sqrt {b^2-4 a c}\right ) d^2 \left (c-a d^2\right )+2 c \left (-2 c^3-6 a c^2 d^2+a b^2 d^4+2 c d^2 \left (b^2-2 a^2 d^2\right )\right )\right ) \text {Subst}\left (\int \frac {1}{4 c^2-\left (b+\sqrt {b^2-4 a c}\right )^2 d^2-x^2} \, dx,x,\frac {2 c+\left (b+\sqrt {b^2-4 a c}\right ) d^2 x}{\sqrt {1-d^2 x^2}}\right )}{\left (b^2-4 a c\right )^{3/2} \left (b^2 d^2-\left (c+a d^2\right )^2\right )}\\ &=-\frac {\left (b \left (b^2 d^2-c \left (c+3 a d^2\right )\right )-c \left (2 c^2-b^2 d^2+2 a c d^2\right ) x\right ) \sqrt {1-d^2 x^2}}{\left (b^2-4 a c\right ) \left (b^2 d^2-\left (c+a d^2\right )^2\right ) \left (a+b x+c x^2\right )}-\frac {c \left (4 c^3+12 a c^2 d^2-a b \left (b+\sqrt {b^2-4 a c}\right ) d^4-c d^2 \left (5 b^2-b \sqrt {b^2-4 a c}-8 a^2 d^2\right )\right ) \tanh ^{-1}\left (\frac {2 c+\left (b-\sqrt {b^2-4 a c}\right ) d^2 x}{\sqrt {2} \sqrt {2 c^2+2 a c d^2-b \left (b-\sqrt {b^2-4 a c}\right ) d^2} \sqrt {1-d^2 x^2}}\right )}{\sqrt {2} \left (b^2-4 a c\right )^{3/2} \sqrt {2 c^2+2 a c d^2-b \left (b-\sqrt {b^2-4 a c}\right ) d^2} \left (b^2 d^2-\left (c+a d^2\right )^2\right )}-\frac {c \left (b \left (b+\sqrt {b^2-4 a c}\right ) d^2 \left (c-a d^2\right )-2 \left (2 c^3+6 a c^2 d^2-a b^2 d^4-2 c d^2 \left (b^2-2 a^2 d^2\right )\right )\right ) \tanh ^{-1}\left (\frac {2 c+\left (b+\sqrt {b^2-4 a c}\right ) d^2 x}{\sqrt {2} \sqrt {2 c^2+2 a c d^2-b \left (b+\sqrt {b^2-4 a c}\right ) d^2} \sqrt {1-d^2 x^2}}\right )}{\sqrt {2} \left (b^2-4 a c\right )^{3/2} \sqrt {2 c^2+2 a c d^2-b \left (b+\sqrt {b^2-4 a c}\right ) d^2} \left (b^2 d^2-\left (c+a d^2\right )^2\right )}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 11.06, size = 800, normalized size = 1.40 \begin {gather*} -\frac {-\frac {2 \left (b^3 d^2-b c \left (c+3 a d^2\right )+b^2 c d^2 x-2 c^2 \left (c+a d^2\right ) x\right ) \sqrt {1-d^2 x^2}}{\left (b^2-4 a c\right ) (a+x (b+c x))}+\frac {c \left (4 c^3+12 a c^2 d^2-a b \left (b+\sqrt {b^2-4 a c}\right ) d^4+c d^2 \left (-5 b^2+b \sqrt {b^2-4 a c}+8 a^2 d^2\right )\right ) \log \left (-b+\sqrt {b^2-4 a c}-2 c x\right )}{\left (b^2-4 a c\right )^{3/2} \sqrt {c^2+a c d^2+\frac {1}{2} b \left (-b+\sqrt {b^2-4 a c}\right ) d^2}}+\frac {c \left (-4 c^3-12 a c^2 d^2+a b \left (b-\sqrt {b^2-4 a c}\right ) d^4+c d^2 \left (5 b^2+b \sqrt {b^2-4 a c}-8 a^2 d^2\right )\right ) \log \left (b+\sqrt {b^2-4 a c}+2 c x\right )}{\left (b^2-4 a c\right )^{3/2} \sqrt {c^2+a c d^2-\frac {1}{2} b \left (b+\sqrt {b^2-4 a c}\right ) d^2}}-\frac {c \left (4 c^3+12 a c^2 d^2-a b \left (b+\sqrt {b^2-4 a c}\right ) d^4+c d^2 \left (-5 b^2+b \sqrt {b^2-4 a c}+8 a^2 d^2\right )\right ) \log \left (-2 c-b d^2 x+\sqrt {b^2-4 a c} d^2 x-\sqrt {4 c^2+4 a c d^2+2 b \left (-b+\sqrt {b^2-4 a c}\right ) d^2} \sqrt {1-d^2 x^2}\right )}{\left (b^2-4 a c\right )^{3/2} \sqrt {c^2+a c d^2+\frac {1}{2} b \left (-b+\sqrt {b^2-4 a c}\right ) d^2}}+\frac {c \left (4 c^3+12 a c^2 d^2+a b \left (-b+\sqrt {b^2-4 a c}\right ) d^4+c d^2 \left (-5 b^2-b \sqrt {b^2-4 a c}+8 a^2 d^2\right )\right ) \log \left (2 c+b d^2 x+\sqrt {b^2-4 a c} d^2 x+\sqrt {4 c^2+4 a c d^2-2 b \left (b+\sqrt {b^2-4 a c}\right ) d^2} \sqrt {1-d^2 x^2}\right )}{\left (b^2-4 a c\right )^{3/2} \sqrt {c^2+a c d^2-\frac {1}{2} b \left (b+\sqrt {b^2-4 a c}\right ) d^2}}}{2 \left (c^2-b^2 d^2+2 a c d^2+a^2 d^4\right )} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [C] Result contains higher order function than in optimal. Order 9 vs. order
3.
time = 0.60, size = 41834, normalized size = 73.26
method | result | size |
default | \(\text {Expression too large to display}\) | \(41834\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 35403 vs.
\(2 (529) = 1058\).
time = 81.34, size = 35403, normalized size = 62.00 \begin {gather*} \text {Too large to display} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {1}{\sqrt {- d x + 1} \sqrt {d x + 1} \left (a + b x + c x^{2}\right )^{2}}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F(-1)] Timed out
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Timed out} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F(-1)]
time = 0.00, size = -1, normalized size = -0.00 \begin {gather*} \text {Hanged} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________